import type { FindIdNumberInput, ProgressDto, SignInput } from './models';
import { RestService, Rest } from '@abp/ng.core';
import type { PagedResultDto } from '@abp/ng.core';
import { Injectable } from '@angular/core';
import type { SignRecordDto } from '../dto/models';

@Injectable({
  providedIn: 'root',
})
export class SignService {
  apiName = 'Default';
  

  add = (input: SignInput, config?: Partial<Rest.Config>) =>
    this.restService.request<any, SignRecordDto>({
      method: 'POST',
      url: '/api/app/sign',
      body: input,
    },
    { apiName: this.apiName,...config });
  

  findIdNumber = (input: FindIdNumberInput, config?: Partial<Rest.Config>) =>
    this.restService.request<any, PagedResultDto<string>>({
      method: 'POST',
      url: '/api/app/sign/find-id-number',
      body: input,
    },
    { apiName: this.apiName,...config });
  

  getProgress = (config?: Partial<Rest.Config>) =>
    this.restService.request<any, ProgressDto>({
      method: 'GET',
      url: '/api/app/sign/progress',
    },
    { apiName: this.apiName,...config });

  constructor(private restService: RestService) {}
}
